# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.SecurityCenter.V1.Model.MitreAttack do
  @moduledoc """
  MITRE ATT&CK tactics and techniques related to this finding. See: https://attack.mitre.org

  ## Attributes

  *   `additionalTactics` (*type:* `list(String.t)`, *default:* `nil`) - Additional MITRE ATT&CK tactics related to this finding, if any.
  *   `additionalTechniques` (*type:* `list(String.t)`, *default:* `nil`) - Additional MITRE ATT&CK techniques related to this finding, if any, along with any of their respective parent techniques.
  *   `primaryTactic` (*type:* `String.t`, *default:* `nil`) - The MITRE ATT&CK tactic most closely represented by this finding, if any.
  *   `primaryTechniques` (*type:* `list(String.t)`, *default:* `nil`) - The MITRE ATT&CK technique most closely represented by this finding, if any. primary_techniques is a repeated field because there are multiple levels of MITRE ATT&CK techniques. If the technique most closely represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), both the sub-technique and its parent technique(s) will be listed (e.g. `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`).
  *   `version` (*type:* `String.t`, *default:* `nil`) - The MITRE ATT&CK version referenced by the above fields. E.g. "8".
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :additionalTactics => list(String.t()) | nil,
          :additionalTechniques => list(String.t()) | nil,
          :primaryTactic => String.t() | nil,
          :primaryTechniques => list(String.t()) | nil,
          :version => String.t() | nil
        }

  field(:additionalTactics, type: :list)
  field(:additionalTechniques, type: :list)
  field(:primaryTactic)
  field(:primaryTechniques, type: :list)
  field(:version)
end

defimpl Poison.Decoder, for: GoogleApi.SecurityCenter.V1.Model.MitreAttack do
  def decode(value, options) do
    GoogleApi.SecurityCenter.V1.Model.MitreAttack.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.SecurityCenter.V1.Model.MitreAttack do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
